﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ERPStore.Extensions;

using CloudSoft.Extensions;

namespace ERPStore.Coupons.Services.Providers
{
	public class SandboxCouponProvider : CouponProviderBase
	{
		public override string Description
		{
			get { return "Sandbox"; }
		}

		public override IList<ERPStore.Models.BrokenRule> ValidateUse(ERPStore.Models.OrderCart cart, ERPStore.Models.UserPrincipal principal)
		{
			var brokenRules = new List<ERPStore.Models.BrokenRule>();
			if (brokenRules.IsNotNullOrEmpty())
			{
				return brokenRules;
			}


			return brokenRules;
		}

		public override void ApplyDiscountTo(Models.CartDiscount discount, ERPStore.Models.OrderCart cart, ERPStore.Models.UserPrincipal principal)
		{
			discount.DiscountReason = "Sandboxed Cart";
			discount.Code = Coupon.Code;
		}
	}
}
